﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DIPPrinciple.OldDesign
{
    public class Button
    {
        private Light _light;
        private bool _isDown;

        public Button()
        {
            _light=new Light();
            _isDown = false;
        }

        public void Click()
        {
            if (_isDown)
            {
                _light.TurnOn();
            }
            else
            {
                _light.TurnOff();
            }
        }
    }
}
